package com.ddl.eurekaclient.strategyMode;

import org.apache.commons.lang3.concurrent.BasicThreadFactory;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledThreadPoolExecutor;

public class Client {


	public static void main(String[] args) {
		ExecutorService fixedThreadPool = Executors.newFixedThreadPool(100);

		for(int i = 0; i < 100; i ++) {
			fixedThreadPool.execute(() -> {
				Context contextA = new Context("原价", 60d, null, null);
				System.out.println(contextA.getResult());
			});
		}


		Context contextB = new Context("折扣", 60d, null, 0.8d);
		System.out.println(contextB.getResult());

		Context contextC = new Context("满减", 60d, 10d, null);
		System.out.println(contextC.getResult());
	}
}
